package anthology.daily_question._24_12;
//https://leetcode.cn/problems/existence-of-a-substring-in-a-string-and-its-reverse/description/?envType=daily-question&envId=2024-12-26
public class _3083字符串及其反转中是否存在同一子字符串 {
    class Solution {
        public boolean isSubstringPresent(String s) {
            for (int i = 0; i + 1 < s.length(); i++) {
                String substr = new StringBuilder(s.substring(i, i + 2)).reverse().toString();
                if (s.contains(substr)) {
                    return true;
                }
            }
            return false;
        }
    }
}
